/**
 *
 */
var app = angular.module('myApp',
    [
        'ui.router',
       // 'secondModule',
       // 'firstModule',
      
    ]);

app.config(function($stateProvider, $urlRouterProvider){
    $stateProvider
        .state('first', {
            url: '/first',
            templateUrl: 'views/first/first.html',
            controller: 'firstController'
        })
        .state('second', {
            url: '/second',
            templateUrl: 'views/second/second.html',
            controller: 'secondController'
        })
        .state('login',{
            url:'/login',
            templateUrl:'views/common/login.html',
            controller:loginFormCtrl
        })

        .state('register',{
            url:'/register',
            templateUrl:'views/common/register.html',
            controller:loginFormCtrl
        })

        .state('userCenter',{
            url:'/userCenter/',
            params:{
                '  ':null,
                'password':null
            },
            templateUrl:'views/userCenter/userCenter.html',
            controller: userCenterController
        })
        .state('editUser',{
            url:'/editUser',
            templateUrl:'views/userCenter/editUser.html',
            controller: editUserController
        })
        .state('photoStart',{
            url:'/photoStart',
            templateUrl:'views/photo/photoStart.html',
            controller: photoStartCtrl
        })

        .state('photoIntro',{
            url:'/photoIntro',
            templateUrl:'views/photo/photoIntro.html',
            controller:photoIntroCtrl
        })
        .state('postBar',{
            url:'/postBar',
            params:{
                'postId':null
            },
            templateUrl:'views/post/postBar.html',
            controller:postController
        })
        .state('singlePost',{
            url:'/singlePost',
            params:{
                'postId':null
            },
            templateUrl:'views/post/singlePost.html',
            controller:singlePostController
        })
        .state('addPost',{
            url:'/addPost',
            params:{
                'postId':null,
                'addFlag':true
            },
            templateUrl:'views/post/addPost.html',
            controller:addPostController
        })


       /*$urlRouterProvider.when('/photoIntro',{

       })*/

    $urlRouterProvider.otherwise('photoStart')
});